<div class="form_item_block required">
    <%= required_label(scope[:form], com.thoughtworks.go.config.materials.perforce.P4MaterialConfig::SERVER_AND_PORT, 'Server and Port') -%>
    <%= scope[:form].text_field com.thoughtworks.go.config.materials.perforce.P4MaterialConfig::SERVER_AND_PORT, {:class => "form_input required p4_url", :id => nil} -%>
    <%= error_message_on(scope[:material], com.thoughtworks.go.config.materials.perforce.P4MaterialConfig::SERVER_AND_PORT, :css_class => "form_error") %>
</div>

<div class="form_item_block">
    <label>Username</label>
    <%= scope[:form].text_field com.thoughtworks.go.config.materials.perforce.P4MaterialConfig::USERNAME, {:class => "form_input p4_username", :id => nil} -%>
    <%= error_message_on(scope[:material], com.thoughtworks.go.config.materials.perforce.P4MaterialConfig::USERNAME, :css_class => "form_error") %>
</div>

<%= render :partial => 'admin/materials/shared/plain_password', :locals => {:scope => {:form => scope[:form], :password_class => 'p4_password'}} %>

<div class="form_item_block required">
    <%= required_label(scope[:form], com.thoughtworks.go.config.materials.perforce.P4MaterialConfig::VIEW, 'View') -%>
    <% error = scope[:material].getP4MaterialView().errors().on(com.thoughtworks.go.config.materials.perforce.P4MaterialConfig::VIEW)
       if error
           scope[:material].errors().add(com.thoughtworks.go.config.materials.perforce.P4MaterialConfig::VIEW, error)
       end
    %>
    <%= scope[:form].text_area com.thoughtworks.go.config.materials.perforce.P4MaterialConfig::VIEW, {:class => "form_input required p4_view", :id => nil, :rows => 4} -%>
    <%= error_message_on(scope[:material], com.thoughtworks.go.config.materials.perforce.P4MaterialConfig::VIEW, :css_class => "form_error") %>
</div>

<div class="form_item_block checkbox_row user_tickets">
    <%= scope[:form].check_box com.thoughtworks.go.config.materials.perforce.P4MaterialConfig::USE_TICKETS, {:id => "material_useTickets"}, "true" -%>
    <label for="material_<%= com.thoughtworks.go.config.materials.perforce.P4MaterialConfig::USE_TICKETS -%>">Use tickets</label>
    <%= error_message_on(scope[:material], com.thoughtworks.go.config.materials.perforce.P4MaterialConfig::USE_TICKETS, :css_class => "form_error") %>
</div>
<%= render :partial => "admin/materials/shared/dest_folder", :locals => {:scope => {:form => scope[:form]}}%>
<%= render :partial => "admin/materials/shared/options", :locals => {:scope => {:form => scope[:form]}} %>
<%= render :partial => "admin/materials/shared/filter", :locals => {:scope => {:form => scope[:form]}} %>
<%= render :partial => 'admin/materials/shared/check_connection', :locals => {:scope => {:username => ".p4_username", :password => ".p4_password", :port => ".p4_url", :type => "p4", :encrypted_password => "false", :view => ".p4_view"}} %>

<%= render :partial => 'shared/convert_tool_tips.html', :locals => {:scope => {}} %>